docs: secret cache reference, README and provider doc updates#19
Merged
docs: secret cache reference, README and provider doc updates#19
Conversation
New docs/secret-cache.md is the authoritative reference for the secret cache: what it is, why it exists, threat model, TPM and HSM backend details, on-disk envelope format, CLI reference, deployment walkthroughs for native/container × TPM/HSM, cold-boot caveat, rotation, and troubleshooting. README updates: new Secret cache configuration section, cache CLI subcommand reference, FCOS deployment note about auto-wired backend credentials, and a clarification that HSM-in-container-mode wiring is auto-generated when cache.backend is hsm. The 'How it works' block now mentions the in-memory dict path. Infisical provider doc: corrects the stale claim that secret values never touch disk (true with the cache disabled, qualified with it enabled), fixes the stale psi-secrets-setup.service name to psi-infisical-setup.service, describes the cache-aware lookup path, and rewrites the security model table. Nitrokey HSM provider doc: updates the example serve quadlet to match current generator output (ContainerName, SecurityLabelType, Notify=healthy, HealthCmd, HealthStartPeriod) and pins the image tag to :latest. CLAUDE.md: adds psi/cache.py and psi/cache_backends.py to the package layout, updates module dependency arrows, and adds psi cache CLI subcommands to the reference. Replaces all homelab-specific examples (project names, instance URLs) with neutral placeholders across all docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/secret-cache.md— authoritative reference for the secret cache feature shipped in PRs Add encrypted secret cache to survive provider outages #15–Fix serve quadlet: SELinux label and ready-signal healthcheck #18.cache:config block, thepsi cacheCLI subcommands, and the FCOS deployment impact.psi/cache.py,psi/cache_backends.py, and thepsi cachesubcommands.What's in
docs/secret-cache.mdcache:block fields, default behavior when unsetsystemd-credsand Nitrokey HSM via PKCS#11, when to pick each, trade-offspsi cache init/status/refresh/invalidatewith examplespodman runone-shot pattern for container-mode installs)psi cache refreshandpsi cache invalidateworkflowsHealthStartPeriodtoo short)README changes
How it worksblock now shows the in-memory dict hot path and mentions the cache file at startupSecret cacheconfiguration subsection with a short example, the two backends summarized, and a link to the referenceSecret cacheCLI reference subsection listingpsi cache init|status|refresh|invalidatepsi-secrets.containerandpsi-{provider}-setup.containerwhen the cache is configured, and that workloads using the nitrokeyhsm provider without the cache still need manual quadlet wiringpsi systemd install --mode containerone-shot invocation works inside a psi container — with a link to the full recipe indocs/secret-cache.mdProvider doc updates
docs/infisical-provider.mdlist_secrets(no extra API calls)_handle_lookuppsi-secrets-setup.servicereference →psi-infisical-setup.service(the real unit name)docs/nitrokeyhsm-provider.mdContainerName=psi-secrets,SecurityLabelType=container_runtime_t,Notify=healthy,HealthCmd,HealthStartPeriod=60s:devto:latestpsi systemd install --mode containeremits all of this automatically whencache.backend: hsmis setCLAUDE.md
psi/cache.pyandpsi/cache_backends.pywith one-line descriptionsserve.py → cache.py,setup.py → cache.py,cache_backends.py → providers/nitrokeyhsm, etc.)psi cachesubcommandspsi-secrets-setup.serviceexample that was indocs/infisical-provider.mdTest plan
uv run pytest -q— 296 passed (no code changes)grep -rn 'homelab\|inf7\.dev' README.md CLAUDE.md docs/— emptydocs/secret-cache.mdlook right